package com.springboot.service.impl;

import com.springboot.mapper.AssistantListFormMapper;
import com.springboot.mapper.UserLoginFormMapper;
import com.springboot.model.AssistantListFormKey;
import com.springboot.model.UserLoginForm;
import com.springboot.service.DoctorDeleteAssistantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 医生在助理列表界面删除助理
 */
@Service
public class DoctorDeleteAssistantServiceImpl implements DoctorDeleteAssistantService {
    @Autowired
    private UserLoginFormMapper userLoginFormMapper;

    @Autowired
    private AssistantListFormMapper assistantListFormMapper;

    //通过手机号码查询用户
    @Override
    public UserLoginForm findUserByTel(String userTel)
    {
        return userLoginFormMapper.selectByTel(userTel);
    }

    //删除助理列表中的数据
    @Override
    public int deleteRecord(AssistantListFormKey assistantListFormKey)
    {
        return assistantListFormMapper.deleteByPrimaryKey(assistantListFormKey);
    }
}
